Add data len check in wh_CommClient_RecvResponse#388
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #388
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
|
@padelsbach Please fix the merge conflicts when you can. Thanks |
f88da69 to
45d4c4c
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #388
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
No new issues found in the changed files. ✅
|
@bigbrett Passing this off to you since this is going to technically break the public API but I don't believe that many (if any) customer's directly call the function in question |
bigbrett
left a comment
There was a problem hiding this comment.
@padelsbach looks great, but this will need to be rebased and then you will see CI fail to show you where new callsites have to be modified (all in the SHE layer)
45d4c4c to
a36d55e
Compare
wh_CommClient_RecvResponsedoes amemcpyinto a caller provided buf without checking the length -- the function does not contain a length param, however the calling functions do.This change adds the
data_sizeparam, so this change does break the API. Alternative was to use existinguint16_t* out_sizeas aninoutparam, but that felt too sneaky and easy to overlook.All 130ish callers updated.
src-jpreferences the params (and is updated), but the Englishsrcdoes not.